<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name=Generator content="Microsoft Word 14 (filtered)">

<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:宋体;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:黑体;
	panose-1:2 1 6 9 6 1 1 1 1 1;}
@font-face
	{font-family:黑体;
	panose-1:2 1 6 9 6 1 1 1 1 1;}
@font-face
	{font-family:方正小标宋简体;}
@font-face
	{font-family:"\@黑体";
	panose-1:2 1 6 9 6 1 1 1 1 1;}
@font-face
	{font-family:"\@宋体";
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:"\@方正小标宋简体";}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
h1
	{mso-style-link:"标题 1 Char";
	margin-top:17.0pt;
	margin-right:0cm;
	margin-bottom:16.5pt;
	margin-left:7.2pt;
	text-align:center;
	text-indent:-7.2pt;
	page-break-after:avoid;
	font-size:22.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
h2
	{mso-style-link:"标题 2 Char";
	margin-top:13.0pt;
	margin-right:0cm;
	margin-bottom:13.0pt;
	margin-left:0cm;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:0cm;
	page-break-after:avoid;
	font-size:16.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
h3
	{mso-style-link:"标题 3 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:0cm;
	page-break-after:avoid;
	font-size:14.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
h4
	{mso-style-link:"标题 4 Char";
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:28.8pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-28.8pt;
	page-break-after:avoid;
	font-size:12.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
h5
	{mso-style-link:"标题 5 Char";
	margin-top:14.0pt;
	margin-right:0cm;
	margin-bottom:14.5pt;
	margin-left:36.0pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-36.0pt;
	line-height:156%;
	page-break-after:avoid;
	font-size:14.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
h6
	{mso-style-link:"标题 6 Char";
	margin-top:12.0pt;
	margin-right:0cm;
	margin-bottom:3.2pt;
	margin-left:43.2pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-43.2pt;
	line-height:133%;
	page-break-after:avoid;
	font-size:12.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
p.MsoHeading7, li.MsoHeading7, div.MsoHeading7
	{mso-style-link:"标题 7 Char";
	margin-top:12.0pt;
	margin-right:0cm;
	margin-bottom:3.2pt;
	margin-left:50.4pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-50.4pt;
	line-height:133%;
	page-break-after:avoid;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.MsoHeading8, li.MsoHeading8, div.MsoHeading8
	{mso-style-link:"标题 8 Char";
	margin-top:12.0pt;
	margin-right:0cm;
	margin-bottom:3.2pt;
	margin-left:57.6pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-72.0pt;
	line-height:133%;
	page-break-after:avoid;
	font-size:12.0pt;
	font-family:"Arial","sans-serif";}
p.MsoHeading9, li.MsoHeading9, div.MsoHeading9
	{mso-style-link:"标题 9 Char";
	margin-top:12.0pt;
	margin-right:0cm;
	margin-bottom:3.2pt;
	margin-left:64.8pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-79.2pt;
	line-height:133%;
	page-break-after:avoid;
	font-size:10.0pt;
	font-family:"Arial","sans-serif";}
p.MsoIndex1, li.MsoIndex1, div.MsoIndex1
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:10.5pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndex2, li.MsoIndex2, div.MsoIndex2
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndex3, li.MsoIndex3, div.MsoIndex3
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:31.5pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndex4, li.MsoIndex4, div.MsoIndex4
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:42.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndex5, li.MsoIndex5, div.MsoIndex5
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:52.5pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndex6, li.MsoIndex6, div.MsoIndex6
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:63.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndex7, li.MsoIndex7, div.MsoIndex7
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:73.5pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndex8, li.MsoIndex8, div.MsoIndex8
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:84.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndex9, li.MsoIndex9, div.MsoIndex9
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:94.5pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoToc1, li.MsoToc1, div.MsoToc1
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.MsoToc2, li.MsoToc2, div.MsoToc2
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoToc3, li.MsoToc3, div.MsoToc3
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:42.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoToc4, li.MsoToc4, div.MsoToc4
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:31.5pt;
	margin-bottom:.0001pt;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoToc5, li.MsoToc5, div.MsoToc5
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:42.0pt;
	margin-bottom:.0001pt;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoToc6, li.MsoToc6, div.MsoToc6
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:52.5pt;
	margin-bottom:.0001pt;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoToc7, li.MsoToc7, div.MsoToc7
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:63.0pt;
	margin-bottom:.0001pt;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoToc8, li.MsoToc8, div.MsoToc8
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:73.5pt;
	margin-bottom:.0001pt;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoToc9, li.MsoToc9, div.MsoToc9
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:84.0pt;
	margin-bottom:.0001pt;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
	{mso-style-link:"脚注文本 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	layout-grid-mode:char;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
	{mso-style-link:"批注文字 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoHeader, li.MsoHeader, div.MsoHeader
	{mso-style-link:"页眉 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	layout-grid-mode:char;
	border:none;
	padding:0cm;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoFooter, li.MsoFooter, div.MsoFooter
	{mso-style-link:"页脚 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	layout-grid-mode:char;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndexHeading, li.MsoIndexHeading, div.MsoIndexHeading
	{mso-style-name:"索引标题\,索引类目\,索引类目1\,索引类目2";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoCaption, li.MsoCaption, div.MsoCaption
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Arial","sans-serif";}
p.MsoTof, li.MsoTof, div.MsoTof
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:42.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-21.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.MsoFootnoteReference
	{vertical-align:super;}
p.MsoList, li.MsoList, div.MsoList
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoList2, li.MsoList2, div.MsoList2
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoList4, li.MsoList4, div.MsoList4
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoDate, li.MsoDate, div.MsoDate
	{mso-style-link:"日期 Char";
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:5.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-name:"超链接\,超级链接";
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
p
	{mso-style-name:"普通\(网站\)\,普通 \(Web\)\,普通 \(Web\)1\,普通 \(Web\)2\,普通 \(Web\)3";
	margin-right:0cm;
	margin-left:0cm;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
pre
	{mso-style-name:"HTML 预设格式\,HTML 预先格式化\,HTML 预先格式化1\,HTML 预先格式化2\,HTML 预先格式化3";
	mso-style-link:"HTML 预设格式 Char\,HTML 预先格式化 Char\,HTML 预先格式化1 Char\,HTML 预先格式化2 Char\,HTML 预先格式化3 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
tt
	{font-family:黑体;}
p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject
	{mso-style-link:"批注主题 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-link:"批注框文本 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.1, li.1, div.1
	{mso-style-name:样式1;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.a, li.a, div.a
	{mso-style-name:代码程序;
	mso-style-link:"代码程序 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:宋体;}
span.Char
	{mso-style-name:"代码程序 Char";
	mso-style-link:代码程序;
	font-family:宋体;}
p.a0, li.a0, div.a0
	{mso-style-name:图说明;
	mso-style-link:"图说明 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char0
	{mso-style-name:"图说明 Char";
	mso-style-link:图说明;
	font-family:宋体;}
p.0, li.0, div.0
	{mso-style-name:封面0;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:36.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.10, li.10, div.10
	{mso-style-name:封面1;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:18.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.11, li.11, div.11
	{mso-style-name:非标题1;
	margin-top:7.8pt;
	margin-right:0cm;
	margin-bottom:7.8pt;
	margin-left:0cm;
	text-align:center;
	font-size:22.0pt;
	font-family:宋体;
	font-weight:bold;}
p.a1, li.a1, div.a1
	{mso-style-name:文本居中;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.3CharChar, li.3CharChar, div.3CharChar
	{mso-style-name:"图中文字3 Char Char";
	mso-style-link:"图中文字3 Char Char Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	line-height:9.0pt;
	font-size:8.0pt;
	font-family:"Times New Roman","serif";}
span.3CharCharChar
	{mso-style-name:"图中文字3 Char Char Char";
	mso-style-link:"图中文字3 Char Char";
	font-family:宋体;}
p.post, li.post, div.post
	{mso-style-name:邮件post;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:right;
	line-height:11.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.3, li.3, div.3
	{mso-style-name:图中字体3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.3CharChar1CharCharChar
	{mso-style-name:"图中文字3 Char Char1 Char Char Char";
	font-family:宋体;}
span.3CharChar1CharChar
	{mso-style-name:"图中文字3 Char Char1 Char Char";
	font-family:宋体;}
p.5Char, li.5Char, div.5Char
	{mso-style-name:"图中文字5号 Char";
	mso-style-link:"图中文字5号 Char Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.5CharChar
	{mso-style-name:"图中文字5号 Char Char";
	mso-style-link:"图中文字5号 Char";
	font-family:宋体;}
p.5CharChar0, li.5CharChar0, div.5CharChar0
	{mso-style-name:"图中文字小5号 Char Char";
	mso-style-link:"图中文字小5号 Char Char Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
span.5CharCharChar
	{mso-style-name:"图中文字小5号 Char Char Char";
	mso-style-link:"图中文字小5号 Char Char";
	font-family:宋体;}
p.5Char0, li.5Char0, div.5Char0
	{mso-style-name:"图中文字小5号 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.5, li.5, div.5
	{mso-style-name:图中文字小5号;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	layout-grid-mode:char;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.2, li.2, div.2
	{mso-style-name:代码程序2;
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:宋体;}
p.20, li.20, div.20
	{mso-style-name:图说明2;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.21, li.21, div.21
	{mso-style-name:文本居中2;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.3CharCharCharCharChar, li.3CharCharCharCharChar, div.3CharCharCharCharChar
	{mso-style-name:"图中文字3 Char Char Char Char Char";
	mso-style-link:"图中文字3 Char Char Char Char Char Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	line-height:9.0pt;
	font-size:8.0pt;
	font-family:"Times New Roman","serif";}
span.3CharCharCharCharCharChar
	{mso-style-name:"图中文字3 Char Char Char Char Char Char";
	mso-style-link:"图中文字3 Char Char Char Char Char";
	font-family:宋体;}
p.a2, li.a2, div.a2
	{mso-style-name:图居中;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.110, li.110, div.110
	{mso-style-name:"样式 标题 1 + 居中1";
	margin-right:0cm;
	margin-left:0cm;
	text-align:center;
	page-break-after:avoid;
	font-size:22.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
span.1Char
	{mso-style-name:"标题 1 Char";
	mso-style-link:"标题 1";
	font-weight:bold;}
p.22, li.22, div.22
	{mso-style-name:"样式 列表 2 + 居中";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.23, li.23, div.23
	{mso-style-name:列表2;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.50, li.50, div.50
	{mso-style-name:图中文字5号;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.111, li.111, div.111
	{mso-style-name:样式11;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.12, li.12, div.12
	{mso-style-name:代码程序1;
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:宋体;}
p.13, li.13, div.13
	{mso-style-name:图说明1;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.01, li.01, div.01
	{mso-style-name:封面01;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:36.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.112, li.112, div.112
	{mso-style-name:封面11;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:18.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.113, li.113, div.113
	{mso-style-name:非标题11;
	margin-top:7.8pt;
	margin-right:0cm;
	margin-bottom:7.8pt;
	margin-left:0cm;
	text-align:center;
	font-size:22.0pt;
	font-family:宋体;
	font-weight:bold;}
p.14, li.14, div.14
	{mso-style-name:文本居中1;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.3Char1, li.3Char1, div.3Char1
	{mso-style-name:"图中文字3 Char1";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	line-height:9.0pt;
	font-size:8.0pt;
	font-family:"Times New Roman","serif";}
p.post1, li.post1, div.post1
	{mso-style-name:邮件post1;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:right;
	line-height:11.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.31, li.31, div.31
	{mso-style-name:图中字体31;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.5Char1, li.5Char1, div.5Char1
	{mso-style-name:"图中文字5号 Char1";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.5CharChar1, li.5CharChar1, div.5CharChar1
	{mso-style-name:"图中文字小5号 Char Char1";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.5Char10, li.5Char10, div.5Char10
	{mso-style-name:"图中文字小5号 Char1";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.51, li.51, div.51
	{mso-style-name:图中文字小5号1;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.120, li.120, div.120
	{mso-style-name:样式12;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.02, li.02, div.02
	{mso-style-name:封面02;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:36.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.121, li.121, div.121
	{mso-style-name:封面12;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:18.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.122, li.122, div.122
	{mso-style-name:非标题12;
	margin-top:7.8pt;
	margin-right:0cm;
	margin-bottom:7.8pt;
	margin-left:0cm;
	text-align:center;
	font-size:22.0pt;
	font-family:宋体;
	font-weight:bold;}
p.3Char2, li.3Char2, div.3Char2
	{mso-style-name:"图中文字3 Char2";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	line-height:9.0pt;
	font-size:8.0pt;
	font-family:"Times New Roman","serif";}
p.post2, li.post2, div.post2
	{mso-style-name:邮件post2;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:right;
	line-height:11.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.32, li.32, div.32
	{mso-style-name:图中字体32;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.5Char2, li.5Char2, div.5Char2
	{mso-style-name:"图中文字小5号 Char2";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.52, li.52, div.52
	{mso-style-name:图中文字小5号2;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.3CharCharCharChar, li.3CharCharCharChar, div.3CharCharCharChar
	{mso-style-name:"图中文字3 Char Char Char Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	line-height:9.0pt;
	font-size:8.0pt;
	font-family:"Times New Roman","serif";}
p.130, li.130, div.130
	{mso-style-name:样式13;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.30, li.30, div.30
	{mso-style-name:代码程序3;
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:宋体;}
p.03, li.03, div.03
	{mso-style-name:封面03;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:36.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.131, li.131, div.131
	{mso-style-name:封面13;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:18.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.132, li.132, div.132
	{mso-style-name:非标题13;
	margin-top:7.8pt;
	margin-right:0cm;
	margin-bottom:7.8pt;
	margin-left:0cm;
	text-align:center;
	font-size:22.0pt;
	font-family:宋体;
	font-weight:bold;}
p.33, li.33, div.33
	{mso-style-name:文本居中3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.3Char3, li.3Char3, div.3Char3
	{mso-style-name:"图中文字3 Char3";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	line-height:9.0pt;
	font-size:8.0pt;
	font-family:"Times New Roman","serif";}
p.post3, li.post3, div.post3
	{mso-style-name:邮件post3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:right;
	line-height:11.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.330, li.330, div.330
	{mso-style-name:图中字体33;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.5Char20, li.5Char20, div.5Char20
	{mso-style-name:"图中文字5号 Char2";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.5CharChar2, li.5CharChar2, div.5CharChar2
	{mso-style-name:"图中文字小5号 Char Char2";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.5Char3, li.5Char3, div.5Char3
	{mso-style-name:"图中文字小5号 Char3";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.53, li.53, div.53
	{mso-style-name:图中文字小5号3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.3Char, li.3Char, div.3Char
	{mso-style-name:"图中文字3 Char";
	mso-style-link:"图中文字3 Char Char5";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	line-height:9.0pt;
	font-size:8.0pt;
	font-family:"Times New Roman","serif";}
span.3CharChar5
	{mso-style-name:"图中文字3 Char Char5";
	mso-style-link:"图中文字3 Char";
	font-family:宋体;}
p.54, li.54, div.54
	{mso-style-name:图中文字小5紧密;
	margin:0cm;
	margin-bottom:.0001pt;
	line-height:9.0pt;
	text-autospace:ideograph-numeric;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.24, li.24, div.24
	{mso-style-name:居中2号粗宋体;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:22.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.15, li.15, div.15
	{mso-style-name:"样式 标题 1 + 居中";
	margin-top:17.0pt;
	margin-right:0cm;
	margin-bottom:16.5pt;
	margin-left:0cm;
	text-align:center;
	page-break-after:avoid;
	font-size:22.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.25, li.25, div.25
	{mso-style-name:"样式 标题 2 + 行距\: 单倍行距";
	margin-top:13.0pt;
	margin-right:0cm;
	margin-bottom:13.0pt;
	margin-left:28.9pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-28.9pt;
	page-break-after:avoid;
	font-size:16.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
span.2Char
	{mso-style-name:"标题 2 Char";
	mso-style-link:"标题 2";
	font-family:"Arial","sans-serif";
	font-weight:bold;}
p.34, li.34, div.34
	{mso-style-name:列表3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.35, li.35, div.35
	{mso-style-name:表3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.4, li.4, div.4
	{mso-style-name:图说明4;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.40, li.40, div.40
	{mso-style-name:列表4;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.41, li.41, div.41
	{mso-style-name:表4;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.55, li.55, div.55
	{mso-style-name:图说明5;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.56, li.56, div.56
	{mso-style-name:列表5;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.57, li.57, div.57
	{mso-style-name:表5;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.6, li.6, div.6
	{mso-style-name:列表6;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.60, li.60, div.60
	{mso-style-name:表6;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.61, li.61, div.61
	{mso-style-name:图说明6;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.7, li.7, div.7
	{mso-style-name:列表7;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.70, li.70, div.70
	{mso-style-name:图说明7;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.71, li.71, div.71
	{mso-style-name:表7;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.8, li.8, div.8
	{mso-style-name:列表8;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.9, li.9, div.9
	{mso-style-name:列表9;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.90, li.90, div.90
	{mso-style-name:图说明9;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.100, li.100, div.100
	{mso-style-name:列表10;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.101, li.101, div.101
	{mso-style-name:图说明10;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.114, li.114, div.114
	{mso-style-name:列表11;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.115, li.115, div.115
	{mso-style-name:图说明11;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.116, li.116, div.116
	{mso-style-name:表11;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.123, li.123, div.123
	{mso-style-name:列表12;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.124, li.124, div.124
	{mso-style-name:图说明12;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.133, li.133, div.133
	{mso-style-name:图说明13;
	mso-style-link:"图说明13 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.13Char
	{mso-style-name:"图说明13 Char";
	mso-style-link:图说明13;
	font-family:宋体;}
p.134, li.134, div.134
	{mso-style-name:列表13;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.26, li.26, div.26
	{mso-style-name:附录2;
	margin-top:13.0pt;
	margin-right:0cm;
	margin-bottom:13.0pt;
	margin-left:0cm;
	text-align:justify;
	text-justify:inter-ideograph;
	page-break-after:avoid;
	font-size:16.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
p.36, li.36, div.36
	{mso-style-name:附录3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	page-break-after:avoid;
	font-size:14.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
span.3Char0
	{mso-style-name:"标题 3 Char";
	mso-style-link:"标题 3";
	font-family:"Arial","sans-serif";
	font-weight:bold;}
p.16, li.16, div.16
	{mso-style-name:附录1;
	margin-top:17.0pt;
	margin-right:0cm;
	margin-bottom:16.5pt;
	margin-left:0cm;
	text-align:center;
	page-break-after:avoid;
	font-size:22.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.17, li.17, div.17
	{mso-style-name:附录表1;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.42, li.42, div.42
	{mso-style-name:附录4;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	page-break-after:avoid;
	font-size:12.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
span.4Char
	{mso-style-name:"标题 4 Char";
	mso-style-link:"标题 4";
	font-family:"Arial","sans-serif";
	font-weight:bold;}
p.a3, li.a3, div.a3
	{mso-style-name:附录图说明;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.27, li.27, div.27
	{mso-style-name:序标题2;
	margin-top:13.0pt;
	margin-right:0cm;
	margin-bottom:13.0pt;
	margin-left:28.8pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-28.8pt;
	page-break-after:avoid;
	font-size:16.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
p.a4, li.a4, div.a4
	{mso-style-name:参考标题;
	margin-top:7.8pt;
	margin-right:0cm;
	margin-bottom:7.8pt;
	margin-left:0cm;
	text-align:center;
	page-break-after:avoid;
	font-size:22.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.18, li.18, div.18
	{mso-style-name:索引标题1;
	margin-top:7.8pt;
	margin-right:0cm;
	margin-bottom:7.8pt;
	margin-left:0cm;
	text-align:center;
	page-break-after:avoid;
	font-size:22.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.19, li.19, div.19
	{mso-style-name:列表1;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.25pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.25pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.1a, li.1a, div.1a
	{mso-style-name:表1;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.25pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.25pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.37, li.37, div.37
	{mso-style-name:图说明3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.62, li.62, div.62
	{mso-style-name:表中字体6号;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	layout-grid-mode:char;
	font-size:7.5pt;
	font-family:"Times New Roman","serif";}
p.a5, li.a5, div.a5
	{mso-style-name:正文代码;
	mso-style-link:"正文代码 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char1
	{mso-style-name:"正文代码 Char";
	mso-style-link:正文代码;
	font-family:宋体;}
p.43, li.43, div.43
	{mso-style-name:"样式 标题 4 +";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	page-break-after:avoid;
	font-size:12.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
p.140, li.140, div.140
	{mso-style-name:表14;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.25pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.25pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.141, li.141, div.141
	{mso-style-name:图说明14;
	mso-style-link:"图说明14 Char";
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.25pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.25pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.14Char
	{mso-style-name:"图说明14 Char";
	mso-style-link:图说明14;
	font-family:宋体;}
p.a6, li.a6, div.a6
	{mso-style-name:文件目录表;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.a7, li.a7, div.a7
	{mso-style-name:"样式 正文 +";
	mso-style-link:"样式 正文 + Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char2
	{mso-style-name:"样式 正文 + Char";
	mso-style-link:"样式 正文 +";
	font-family:"Times New Roman","serif";}
p.a8, li.a8, div.a8
	{mso-style-name:表格题注;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.5pt;
	font-family:宋体;}
p.a9, li.a9, div.a9
	{mso-style-name:列表题注;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.5pt;
	font-family:"Arial","sans-serif";}
p.aa, li.aa, div.aa
	{mso-style-name:图题注;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.5pt;
	font-family:"Arial","sans-serif";}
p.ab, li.ab, div.ab
	{mso-style-name:程序题注;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.5pt;
	font-family:"Arial","sans-serif";}
p.ac, li.ac, div.ac
	{mso-style-name:框中文字;
	margin-top:0cm;
	margin-right:21.0pt;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	border:none;
	padding:0cm;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.125, li.125, div.125
	{mso-style-name:"样式 标题 1 + 居中2";
	margin-top:17.0pt;
	margin-right:0cm;
	margin-bottom:16.5pt;
	margin-left:0cm;
	text-align:center;
	page-break-after:avoid;
	font-size:22.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.ad, li.ad, div.ad
	{mso-style-name:"样式 题注 + 宋体 五号 居中";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.5pt;
	font-family:黑体;}
p.1b, li.1b, div.1b
	{mso-style-name:序标题1;
	margin-top:17.0pt;
	margin-right:0cm;
	margin-bottom:16.5pt;
	margin-left:0cm;
	line-height:240%;
	page-break-after:avoid;
	font-size:16.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.38, li.38, div.38
	{mso-style-name:序标题3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	page-break-after:avoid;
	font-size:12.0pt;
	font-family:方正小标宋简体;}
p.63, li.63, div.63
	{mso-style-name:表中文字6号;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:7.5pt;
	font-family:"Times New Roman","serif";}
p.64, li.64, div.64
	{mso-style-name:图中文字6号左对齐;
	margin:0cm;
	margin-bottom:.0001pt;
	line-height:10.0pt;
	layout-grid-mode:char;
	font-size:7.5pt;
	font-family:"Times New Roman","serif";}
p.65, li.65, div.65
	{mso-style-name:图中文字6号;
	mso-style-link:"图中文字6号 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	line-height:10.0pt;
	layout-grid-mode:char;
	font-size:7.5pt;
	font-family:"Times New Roman","serif";}
span.6Char
	{mso-style-name:"图中文字6号 Char";
	mso-style-link:图中文字6号;
	font-family:宋体;}
p.ae, li.ae, div.ae
	{mso-style-name:图标;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.28, li.28, div.28
	{mso-style-name:图标2;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.af, li.af, div.af
	{mso-style-name:习题标题;
	margin-top:6.0pt;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	page-break-after:avoid;
	font-size:14.0pt;
	font-family:黑体;}
p.1c, li.1c, div.1c
	{mso-style-name:部分编号1;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:16.0pt;
	font-family:"Times New Roman","serif";}
p.af0, li.af0, div.af0
	{mso-style-name:表标题;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Arial","sans-serif";}
p.af1, li.af1, div.af1
	{mso-style-name:"样式 题注 + 居中";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.ListTitle, li.ListTitle, div.ListTitle
	{mso-style-name:ListTitle;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Arial","sans-serif";}
p.FigureTitle, li.FigureTitle, div.FigureTitle
	{mso-style-name:FigureTitle;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Arial","sans-serif";}
p.TableTitle, li.TableTitle, div.TableTitle
	{mso-style-name:TableTitle;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Arial","sans-serif";}
p.ProgramTitle, li.ProgramTitle, div.ProgramTitle
	{mso-style-name:ProgramTitle;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Arial","sans-serif";}
p.RightText, li.RightText, div.RightText
	{mso-style-name:RightText;
	margin-top:0cm;
	margin-right:21.0pt;
	margin-bottom:0cm;
	margin-left:42.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	border:none;
	padding:0cm;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.af2, li.af2, div.af2
	{mso-style-name:表中文字小五;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.af3, li.af3, div.af3
	{mso-style-name:关键词;
	mso-style-link:"关键词 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char3
	{mso-style-name:"关键词 Char";
	mso-style-link:关键词;
	font-family:宋体;}
p.af4, li.af4, div.af4
	{mso-style-name:文件名;
	mso-style-link:"文件名 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char4
	{mso-style-name:"文件名 Char";
	mso-style-link:文件名;
	font-family:宋体;}
p.af5, li.af5, div.af5
	{mso-style-name:选项;
	mso-style-link:"选项 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char5
	{mso-style-name:"选项 Char";
	mso-style-link:选项;
	font-family:宋体;}
p.af6, li.af6, div.af6
	{mso-style-name:命令行;
	mso-style-link:"命令行 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char6
	{mso-style-name:"命令行 Char";
	mso-style-link:命令行;
	font-family:宋体;}
p.af7, li.af7, div.af7
	{mso-style-name:函数名;
	mso-style-link:"函数名 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char7
	{mso-style-name:"函数名 Char";
	mso-style-link:函数名;
	font-family:宋体;}
p.af8, li.af8, div.af8
	{mso-style-name:寄存器名;
	mso-style-link:"寄存器名 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char8
	{mso-style-name:"寄存器名 Char";
	mso-style-link:寄存器名;
	font-family:"Times New Roman","serif";}
p.af9, li.af9, div.af9
	{mso-style-name:变量名;
	mso-style-link:"变量名 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char9
	{mso-style-name:"变量名 Char";
	mso-style-link:变量名;
	font-family:宋体;}
p.58, li.58, div.58
	{mso-style-name:图中文字小5号左;
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.59, li.59, div.59
	{mso-style-name:图中文字小5号靠左;
	margin:0cm;
	margin-bottom:.0001pt;
	layout-grid-mode:char;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.926, li.926, div.926
	{mso-style-name:"样式 代码程序 + 左侧\:  9\.26 厘米";
	margin:0cm;
	margin-bottom:.0001pt;
	layout-grid-mode:char;
	font-size:10.0pt;
	font-family:宋体;}
span.5Char4
	{mso-style-name:"标题 5 Char";
	mso-style-link:"标题 5";
	font-weight:bold;}
span.6Char0
	{mso-style-name:"标题 6 Char";
	mso-style-link:"标题 6";
	font-family:"Arial","sans-serif";
	font-weight:bold;}
span.7Char
	{mso-style-name:"标题 7 Char";
	mso-style-link:"标题 7";
	font-weight:bold;}
span.8Char
	{mso-style-name:"标题 8 Char";
	mso-style-link:"标题 8";
	font-family:"Arial","sans-serif";}
span.9Char
	{mso-style-name:"标题 9 Char";
	mso-style-link:"标题 9";
	font-family:"Arial","sans-serif";}
span.Chara
	{mso-style-name:"脚注文本 Char";
	mso-style-link:脚注文本;
	font-family:宋体;}
span.Charb
	{mso-style-name:"批注文字 Char";
	mso-style-link:批注文字;
	font-family:宋体;}
span.Charc
	{mso-style-name:"页眉 Char";
	mso-style-link:页眉;
	font-family:宋体;}
span.Chard
	{mso-style-name:"页脚 Char";
	mso-style-link:页脚;
	font-family:宋体;}
span.Chare
	{mso-style-name:"日期 Char";
	mso-style-link:日期;
	font-family:宋体;}
span.HTMLChar
	{mso-style-name:"HTML 预设格式 Char\,HTML 预先格式化 Char\,HTML 预先格式化1 Char\,HTML 预先格式化2 Char\,HTML 预先格式化3 Char";
	mso-style-link:"HTML 预设格式\,HTML 预先格式化\,HTML 预先格式化1\,HTML 预先格式化2\,HTML 预先格式化3";
	font-family:宋体;}
span.Charf
	{mso-style-name:"批注主题 Char";
	mso-style-link:批注主题;
	font-family:宋体;
	font-weight:bold;}
span.Charf0
	{mso-style-name:"批注框文本 Char";
	mso-style-link:批注框文本;
	font-family:宋体;}
span.5CharCharChar0
	{mso-style-name:"图中文字5号 Char Char Char";
	font-family:宋体;}
span.5CharCharCharChar
	{mso-style-name:"图中文字小5号 Char Char Char Char";
	font-family:宋体;}
.MsoChpDefault
	{font-size:10.0pt;}
 /* Page Definitions */
 @page WordSection1
	{size:595.3pt 841.9pt;
	margin:72.0pt 54.0pt 72.0pt 54.0pt;
	layout-grid:15.6pt;}
div.WordSection1
	{page:WordSection1;}
 /* List Definitions */
 ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
-->
</style>

</head>

<body lang=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'>

<div class=WordSection1 style='layout-grid:15.6pt'>

<p class=MsoNormal align=center style='text-align:center'><a name="_Toc53320599"><span
style='font-size:10.5pt;font-family:黑体'>程序</span></a><span lang=EN-US
style='font-size:10.5pt;font-family:"Arial","sans-serif"'>6-3 linux/boot/head.s</span></p>

<div class=MsoNormal align=center style='text-align:center'><span lang=EN-US
style='font-family:宋体'>

<hr size=4 width="100%" align=center>

</span></div>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp; <u><span style='color:blue'>1</span></u> /*</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp; <u><span style='color:blue'>2</span></u>&nbsp;
*&nbsp; linux/boot/head.s</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp; <u><span style='color:blue'>3</span></u>&nbsp; *</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp; <u><span style='color:blue'>4</span></u>&nbsp;
*&nbsp; (C) 1991&nbsp; Linus Torvalds</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp; <u><span style='color:blue'>5</span></u>&nbsp; */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp; <u><span style='color:blue'>6</span></u> </span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp; <u><span style='color:blue'>7</span></u> /*</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp; <u><span style='color:blue'>8</span></u>&nbsp;
*&nbsp; head.s contains the 32-bit startup code.</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp; <u><span style='color:blue'>9</span></u>&nbsp; *</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>10</span></u>&nbsp; *
NOTE!!! Startup happens at absolute address 0x00000000, which is also where</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>11</span></u>&nbsp; *
the page directory will exist. The startup code will be overwritten by</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>12</span></u>&nbsp; *
the page directory.</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>13</span></u>&nbsp; */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; /*</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp; head.s</span><span
style='font-family:宋体'>含有<span lang=EN-US>32</span>位启动代码。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>注意<span lang=EN-US>!!! 32</span>位启动代码是从绝对地址<span
lang=EN-US>0x00000000</span>开始的，这里也同样是页目录将存在的地方，</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp; &nbsp;&nbsp;* </span><span
style='font-family:宋体'>因此这里的启动代码将被页目录覆盖掉。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; &nbsp;*/</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>14</span></u> .text</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>15</span></u> .globl
_idt,_gdt,_pg_dir,_tmp_floppy_area</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>16</span></u> _pg_dir:&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#
</span><span style='font-family:宋体'>页目录将会存放在这里。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>再次注意<span lang=EN-US>!!! </span>这里已经处于<span lang=EN-US>32</span>位运行模式，因此这里的<span
lang=EN-US>$0x10</span>并不是把地址<span lang=EN-US>0x10</span>装入各个</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>段寄存器，它现在其实是全局段描述符表中的偏移值，或者更准确地说是一个描述符表项</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>的选择符。有关选择符的说明请参见<span lang=EN-US>setup.s</span>中<span lang=EN-US>193</span>行下的说明。这里<span
lang=EN-US>$0x10</span>的含义是请求</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>特权级<span lang=EN-US>0(</span>位<span lang=EN-US>0-1=0)</span>、选择全局描述符表<span
lang=EN-US>(</span>位<span lang=EN-US>2=0)</span>、选择表中第<span lang=EN-US>2</span>项<span
lang=EN-US>(</span>位<span lang=EN-US>3-15=2)</span>。它正好指</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>向表中的数据段描述符项。（描述符的具体数值参见前面<span lang=EN-US>setup.s</span>中<span lang=EN-US>212</span>，<span
lang=EN-US>213</span>行）</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>下面代码的含义是：设置<span lang=EN-US>ds,es,fs,gs</span>为<span lang=EN-US>setup.s </span>中构造的数据段（全局段描述符表第<span
lang=EN-US>2</span>项）</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>的选择符<span lang=EN-US>=0x10</span>，并将堆栈放置在<span lang=EN-US>stack_start</span>指向的<span
lang=EN-US>user_stack</span>数组区，然后使用本程序</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>后面定义的新中断描述符表和全局段描述表。新全局段描述表中初始内容与<span lang=EN-US>setup.s</span>中的基本</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>一样，仅段限长从<span lang=EN-US>8MB</span>修改成了<span lang=EN-US>16MB</span>。<span
lang=EN-US>stack_start</span>定义在<span lang=EN-US>kernel/sched.c</span>，<span
lang=EN-US>69</span>行。它是指向</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # user_stack</span><span
style='font-family:宋体'>数组末端的一个长指针。第<span lang=EN-US>23</span>行设置这里使用的栈，姑且称为系统栈。但在移动到</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>任务<span lang=EN-US>0</span>执行（<span lang=EN-US>init/main.c</span>中<span
lang=EN-US>137</span>行）以后该栈就被用作任务<span lang=EN-US>0</span>和任务<span lang=EN-US>1</span>共同使用的用户栈了。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>17</span></u>
startup_32:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;# 18-22</span><span style='font-family:宋体'>行设置各个数据段寄存器。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>18</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movl $0x10,%eax&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;# </span><span style='font-family:
宋体'>对于<span lang=EN-US>GNU</span>汇编，每个直接操作数要以<span lang=EN-US>'$'</span>开始，否则表示地址。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;# </span><span style='font-family:宋体'>每个寄存器名都要以<span
lang=EN-US>'%'</span>开头，<span lang=EN-US>eax</span>表示是<span lang=EN-US>32</span>位的<span
lang=EN-US>ax</span>寄存器。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>19</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
mov %ax,%ds</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>20</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
mov %ax,%es</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>21</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
mov %ax,%fs</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>22</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
mov %ax,%gs</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>23</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
lss _stack_start,%esp&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;# </span><span
style='font-family:宋体'>表示<span lang=EN-US>_stack_start</span></span><span
lang=EN-US style='font-family:Wingdings'>è</span><span lang=EN-US
style='font-family:宋体'>ss:esp</span><span style='font-family:宋体'>，设置系统堆栈。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;# stack_start</span><span style='font-family:宋体'>定义在<span
lang=EN-US>kernel/sched.c</span>，<span lang=EN-US>69</span>行。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>24</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
call setup_idt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;#
</span><span style='font-family:宋体'>调用设置中断描述符表子程序。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>25</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
call setup_gdt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;#
</span><span style='font-family:宋体'>调用设置全局描述符表子程序。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>26</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movl
$0x10,%eax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #
reload all the segment registers</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>27</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
mov
%ax,%ds&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# after changing gdt. CS was already</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>28</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
mov %ax,%es&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;#
reloaded in 'setup_gdt'</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>29</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
mov %ax,%fs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;# </span><span style='font-family:宋体'>因为修改了<span lang=EN-US>gdt</span>，所以需要重新装载所有的段寄存器。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>30</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
mov %ax,%gs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;# CS</span><span style='font-family:宋体'>代码段寄存器已经在<span
lang=EN-US>setup_gdt</span>中重新加载过了。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>由于段描述符中的段限长从<span lang=EN-US>setup.s</span>中的<span lang=EN-US>8MB</span>改成了本程序设置的<span
lang=EN-US>16MB</span>（见<span lang=EN-US>setup.s</span>行<span lang=EN-US>208-216</span></span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>和本程序后面的<span lang=EN-US>235-236</span>行），因此这里再次对所有段寄存器执行加载操作是必须的。另外，通过</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>使用<span lang=EN-US>bochs</span>跟踪观察，如果不对<span lang=EN-US>CS</span>再次执行加载，那么在执行到<span
lang=EN-US>26</span>行时<span lang=EN-US>CS</span>代码段不可见部分中</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>的限长还是<span lang=EN-US>8MB</span>。这样看来应该重新加载<span lang=EN-US>CS</span>。但是由于<span
lang=EN-US>setup.s</span>中的内核代码段描述符与本程序中</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>重新设置的代码段描述符除了段限长以外其余部分完全一样，<span lang=EN-US>8MB</span>的限长在内核初始化阶段不会有</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>问题，而且在以后内核执行过程中段间跳转时会重新加载<span lang=EN-US>CS</span>。因此这里没有加载它并没有让程序</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>出错。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>针对该问题，目前内核中就在第<span lang=EN-US>25</span>行之后添加了一条长跳转指令：<span lang=EN-US>'ljmp
$(__KERNEL_CS),$1f'</span>，</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>跳转到第<span lang=EN-US>26</span>行来确保<span lang=EN-US>CS</span>确实又被重新加载。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>31</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
lss _stack_start,%esp</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # 32-36</span><span style='font-family:
宋体'>行用于测试<span lang=EN-US>A20</span>地址线是否已经开启。采用的方法是向内存地址<span lang=EN-US>0x000000</span>处写入任意</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>一个数值，然后看内存地址<span lang=EN-US>0x100000(1M)</span>处是否也是这个数值。如果一直相同的话，就一直</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>比较下去，也即死循环、死机。表示地址<span lang=EN-US>A20</span>线没有选通，结果内核就不能使用<span
lang=EN-US>1MB</span>以上内存。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # 33</span><span style='font-family:
宋体'>行上的<span lang=EN-US>'1:'</span>是一个局部符号构成的标号。标号由符号后跟一个冒号组成。此时该符号表示活动</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>位置计数（<span lang=EN-US>Active location counter</span>）的当前值，并可以作为指令的操作数。局部符号用于帮助</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>编译器和编程人员临时使用一些名称。共有<span lang=EN-US>10</span>个局部符号名，可在整个程序中重复使用。这些符号</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>名使用名称<span lang=EN-US>'0'</span>、<span lang=EN-US>'1'</span>、<span
lang=EN-US>...</span>、<span lang=EN-US>'9'</span>来引用。为了定义一个局部符号，需把标号写成<span
lang=EN-US>'N:'</span>形式（其中<span lang=EN-US>N</span></span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>表示一个数字）。为了引用先前最近定义的这个符号，需要写成<span lang=EN-US>'Nb'</span>，其中<span
lang=EN-US>N</span>是定义标号时使用的</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>数字。为了引用一个局部标号的下一个定义，需要写成<span lang=EN-US>'Nf'</span>，这里<span lang=EN-US>N</span>是<span
lang=EN-US>10</span>个前向引用之一。上面</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # 'b'</span><span style='font-family:
宋体'>表示<span lang=EN-US>“</span>向后（<span lang=EN-US>backwards</span>）<span
lang=EN-US>”</span>，<span lang=EN-US>'f'</span>表示<span lang=EN-US>“</span>向前（<span
lang=EN-US>forwards</span>）<span lang=EN-US>”</span>。在汇编程序的某一处，我们最大</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>可以向后<span lang=EN-US>/</span>向前引用<span lang=EN-US>10</span>个标号（最远第<span
lang=EN-US>10</span>个）。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>32</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
xorl %eax,%eax</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>33</span></u>
1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; incl
%eax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#
check that A20 really IS enabled</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>34</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movl %eax,0x000000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # loop
forever if it isn't</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>35</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
cmpl %eax,0x100000</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>36</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
je 1b&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;# '1b'</span><span style='font-family:宋体'>表示向后<span
lang=EN-US>(backward)</span>跳转到标号<span lang=EN-US>1</span>去（<span lang=EN-US>33</span>行）。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;# </span><span style='font-family:宋体'>若是<span lang=EN-US>'5f'</span>则表示向前<span
lang=EN-US>(forward)</span>跳转到标号<span lang=EN-US>5</span>去。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>37</span></u> /*</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>38</span></u>&nbsp; *
NOTE! 486 should set bit 16, to check for write-protect in supervisor</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>39</span></u>&nbsp; *
mode. Then it would be unnecessary with the &quot;verify_area()&quot;-calls.</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>40</span></u>&nbsp; *
486 users probably want to set the NE (#5) bit also, so as to use</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>41</span></u>&nbsp; *
int 16 for math errors.</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>42</span></u>&nbsp; */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; /*</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>注意<span lang=EN-US>! </span>在下面这段程序中，<span lang=EN-US>486</span>应该将位<span
lang=EN-US>16</span>置位，以检查在超级用户模式下的写保护<span lang=EN-US>,</span></span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>此后<span lang=EN-US> &quot;verify_area()&quot; </span>调用就不需要了。<span
lang=EN-US>486</span>的用户通常也会想将<span lang=EN-US>NE(#5)</span>置位，以便</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>对数学协处理器的出错使用<span lang=EN-US>int 16</span>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>上面原注释中提到的<span lang=EN-US>486 CPU</span>中<span lang=EN-US>CR0</span>控制寄存器的位<span
lang=EN-US>16</span>是写保护标志<span lang=EN-US>WP</span>（<span lang=EN-US>Write-Protect</span>），</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>用于禁止超级用户级的程序向一般用户只读页面中进行写操作。该标志主要用于操作系统在创建</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>新进程时实现写时复制（<span lang=EN-US>copy-on-write</span>）方法。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>下面这段程序（<span lang=EN-US>43-65</span>）用于检查数学协处理器芯片是否存在。方法是修改控制寄存器<span
lang=EN-US>CR0</span>，在</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>假设存在协处理器的情况下执行一个协处理器指令，如果出错的话则说明协处理器芯片不存在，</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>需要设置<span lang=EN-US>CR0</span>中的协处理器仿真位<span lang=EN-US>EM</span>（位<span
lang=EN-US>2</span>），并复位协处理器存在标志<span lang=EN-US>MP</span>（位<span lang=EN-US>1</span>）。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>43</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movl
%cr0,%eax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# check math chip</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>44</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
andl $0x80000011,%eax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Save PG,PE,ET</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>45</span></u> /*
&quot;orl $0x10020,%eax&quot; here for 486 might be good */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>46</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
orl
$2,%eax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# set MP</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>47</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movl %eax,%cr0</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>48</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
call check_x87</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>49</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
jmp after_page_tables&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;# </span><span
style='font-family:宋体'>跳转到<span lang=EN-US>135</span>行。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>50</span></u> </span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>51</span></u> /*</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>52</span></u>&nbsp; *
We depend on ET to be correct. This checks for 287/387.</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>53</span></u>&nbsp; */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; /*</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>我们依赖于<span lang=EN-US>ET</span>标志的正确性来检测<span
lang=EN-US>287/387</span>存在与否。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>下面<span lang=EN-US>fninit</span>和<span lang=EN-US>fstsw</span>是数学协处理器（<span
lang=EN-US>80287/80387</span>）的指令。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # finit </span><span
style='font-family:宋体'>向协处理器发出初始化命令，它会把协处理器置于一个未受以前操作影响的已知状态，设置</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>其控制字为默认值、清除状态字和所有浮点栈式寄存器。非等待形式的这条指令（<span lang=EN-US>fninit</span>）还会让</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>协处理器终止执行当前正在执行的任何先前的算术操作。<span lang=EN-US>fstsw </span>指令取协处理器的状态字。如果系</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>统中存在协处理器的话，那么在执行了<span lang=EN-US>fninit</span>指令后其状态字低字节肯定为<span
lang=EN-US>0</span>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>54</span></u>
check_x87:</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>55</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
fninit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# </span><span style='font-family:宋体'>向协处理器发出初始化命令。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>56</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
fstsw %ax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;# </span><span style='font-family:宋体'>取协处理器状态字到<span
lang=EN-US>ax</span>寄存器中。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>57</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
cmpb
$0,%al&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# </span><span style='font-family:宋体'>初始化后状态字应该为<span lang=EN-US>0</span>，否则说明协处理器不存在。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>58</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
je 1f&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* no coprocessor: have
to set bits */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>59</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movl %cr0,%eax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;#
</span><span style='font-family:宋体'>如果存在则向前跳转到标号<span lang=EN-US>1</span>处，否则改写<span
lang=EN-US>cr0</span>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>60</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
xorl
$6,%eax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/* reset MP, set EM */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>61</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movl %eax,%cr0</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>62</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ret</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>下面是一汇编语言指示符。其含义是指存储边界对齐调整。<span lang=EN-US>&quot;2&quot;</span>表示把随后的代码或数据的偏移位置</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>调整到地址值最后<span lang=EN-US>2</span>比特位为零的位置（<span lang=EN-US>2^2</span>），即按<span
lang=EN-US>4</span>字节方式对齐内存地址。不过现在<span lang=EN-US>GNU as</span></span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>直接时写出对齐的值而非<span lang=EN-US>2</span>的次方值了。使用该指示符的目的是为了提高<span lang=EN-US>32</span>位<span
lang=EN-US>CPU</span>访问内存中代码</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>或数据的速度和效率。参见程序后的详细说明。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>下面的两个字节值是<span lang=EN-US>80287</span>协处理器指令<span lang=EN-US>fsetpm</span>的机器码。其作用是把<span
lang=EN-US>80287</span>设置为保护模式。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # 80387</span><span style='font-family:
宋体'>无需该指令，并且将会把该指令看作是空操作。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>63</span></u> .align 2</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>64</span></u>
1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .byte
0xDB,0xE4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*
fsetpm for 287, ignored by 387 */&nbsp; # 287</span><span style='font-family:
宋体'>协处理器码。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>65</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ret</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>66</span></u> </span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>67</span></u> /*</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>68</span></u>&nbsp;
*&nbsp; setup_idt</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>69</span></u>&nbsp; *</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>70</span></u>&nbsp;
*&nbsp; sets up a idt with 256 entries pointing to</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>71</span></u>&nbsp;
*&nbsp; ignore_int, interrupt gates. It then loads</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>72</span></u>&nbsp;
*&nbsp; idt. Everything that wants to install itself</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>73</span></u>&nbsp; *&nbsp;
in the idt-table may do so themselves. Interrupts</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>74</span></u>&nbsp;
*&nbsp; are enabled elsewhere, when we can be relatively</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>75</span></u>&nbsp;
*&nbsp; sure everything is ok. This routine will be over-</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>76</span></u>&nbsp;
*&nbsp; written by the page tables.</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>77</span></u>&nbsp; */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; /*</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>下面这段是设置中断描述符表子程序<span lang=EN-US> setup_idt</span></span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; &nbsp;*</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>将中断描述符表<span lang=EN-US>idt</span>设置成具有<span lang=EN-US>256</span>个项，并都指向<span
lang=EN-US>ignore_int</span>中断门。然后加载中断</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>描述符表寄存器<span lang=EN-US>(</span>用<span lang=EN-US>lidt</span>指令<span
lang=EN-US>)</span>。真正实用的中断门以后再安装。当我们在其他地方认为一切</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>都正常时再开启中断。该子程序将会被页表覆盖掉。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>中断描述符表中的项虽然也是<span lang=EN-US>8</span>字节组成，但其格式与全局表中的不同，被称为门描述符</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # (Gate Descriptor)</span><span
style='font-family:宋体'>。它的<span lang=EN-US>0-1,6-7</span>字节是偏移量，<span
lang=EN-US>2-3</span>字节是选择符，<span lang=EN-US>4-5</span>字节是一些标志。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp; &nbsp;&nbsp;# </span><span style='font-family:
宋体'>这段代码首先在<span lang=EN-US>edx</span>、<span lang=EN-US>eax</span>中组合设置出<span
lang=EN-US>8</span>字节默认的中断描述符值，然后在<span lang=EN-US>idt</span>表每一项中</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>都放置该描述符，共<span lang=EN-US>256</span>项。<span lang=EN-US>eax</span>含有描述符低<span
lang=EN-US>4</span>字节，<span lang=EN-US>edx</span>含有高<span lang=EN-US>4</span>字节。内核在随后的初始</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>化过程中会替换安装那些真正实用的中断描述符项。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>78</span></u>
setup_idt:</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>79</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
lea ignore_int,%edx&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # </span><span
style='font-family:宋体'>将<span lang=EN-US>ignore_int</span>的有效地址（偏移值）值</span><span
lang=EN-US style='font-family:Wingdings'>è</span><span lang=EN-US
style='font-family:宋体'>edx</span><span style='font-family:宋体'>寄存器</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>80</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movl $0x00080000,%eax&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;# </span><span
style='font-family:宋体'>将选择符<span lang=EN-US>0x0008</span>置入<span lang=EN-US>eax</span>的高<span
lang=EN-US>16</span>位中。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>81</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movw
%dx,%ax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/* selector = 0x0008 = cs */ </span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;# </span><span style='font-family:宋体'>偏移值的低<span lang=EN-US>16</span>位置入<span
lang=EN-US>eax</span>的低<span lang=EN-US>16</span>位中。此时<span lang=EN-US>eax</span>含有</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;# </span><span style='font-family:宋体'>门描述符低<span lang=EN-US>4</span>字节的值。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>82</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movw $0x8E00,%dx&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;/*
interrupt gate - dpl=0, present */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>83</span></u> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#
</span><span style='font-family:宋体'>此时<span lang=EN-US>edx</span>含有门描述符高<span
lang=EN-US>4</span>字节的值。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>84</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
lea _idt,%edi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;# _idt</span><span style='font-family:宋体'>是中断描述符表的地址。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>85</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
mov $256,%ecx</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>86</span></u> rp_sidt:</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>87</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movl %eax,(%edi)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;# </span><span
style='font-family:宋体'>将哑中断门描述符存入表中。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>88</span></u>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movl %edx,4(%edi)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# eax</span><span style='font-family:宋体'>内容放到 <span lang=EN-US>edi+4 </span>所指内存位置处。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>89</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
addl $8,%edi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;# edi</span><span style='font-family:宋体'>指向表中下一项。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>90</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
dec %ecx</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>91</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
jne rp_sidt</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>92</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
lidt idt_descr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;#
</span><span style='font-family:宋体'>加载中断描述符表寄存器值。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>93</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ret</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>94</span></u> </span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>95</span></u> /*</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>96</span></u>&nbsp;
*&nbsp; setup_gdt</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>97</span></u>&nbsp; *</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>98</span></u>&nbsp;
*&nbsp; This routines sets up a new gdt and loads it.</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;<u><span style='color:blue'>99</span></u>&nbsp;
*&nbsp; Only two entries are currently built, the same</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>100</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; *&nbsp; ones that were built in init.s. The
routine</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>101</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; *&nbsp; is VERY complicated at two whole lines,
so this</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>102</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; *&nbsp; rather long comment is certainly needed
:-).</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>103</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; *&nbsp; This routine will beoverwritten by the
page tables.</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>104</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; /*</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>设置全局描述符表项 <span lang=EN-US>setup_gdt</span></span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>这个子程序设置一个新的全局描述符表<span lang=EN-US>gdt</span>，并加载。此时仅创建了两个表项，与前</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>面的一样。该子程序只有两行，“非常的”复杂，所以当然需要这么长的注释了</span><span
lang=EN-US style='font-family:Wingdings'>J</span><span style='font-family:宋体'>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>该子程序将被页表覆盖掉。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; */</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>105</span></u><span lang=EN-US
style='font-family:宋体'> setup_gdt:</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>106</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lgdt
gdt_descr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#
</span><span style='font-family:宋体'>加载全局描述符表寄存器<span lang=EN-US>(</span>内容已设置好，见<span
lang=EN-US>234-238</span>行<span lang=EN-US>)</span>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>107</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ret</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>108</span></u><span lang=EN-US
style='font-family:宋体'> </span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>109</span></u><span lang=EN-US
style='font-family:宋体'> /*</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>110</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * I put the kernel page tables right after the
page directory,</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>111</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * using 4 of them to span 16 Mb of physical
memory. People with</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>112</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * more than 16MB will have to expand this.</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>113</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; /* Linus</span><span
style='font-family:宋体'>将内核的内存页表直接放在页目录之后，使用了<span lang=EN-US>4</span>个表来寻址<span
lang=EN-US>16 MB</span>的物理内存。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>如果你有多于<span lang=EN-US>16 Mb</span>的内存，就需要在这里进行扩充修改。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; # </span><span
style='font-family:宋体'>每个页表长为<span lang=EN-US>4 Kb</span>字节（<span lang=EN-US>1</span>页内存页面），而每个页表项需要<span
lang=EN-US>4</span>个字节，因此一个页表共可以存放</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; # 1024</span><span
style='font-family:宋体'>个表项。如果一个页表项寻址<span lang=EN-US>4 KB</span>的地址空间，则一个页表就可以寻址<span
lang=EN-US>4 MB</span>的物理内存。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; # </span><span
style='font-family:宋体'>页表项的格式为：项的前<span lang=EN-US>0-11</span>位存放一些标志，例如是否在内存中<span
lang=EN-US>(P</span>位<span lang=EN-US>0)</span>、读写许可<span lang=EN-US>(R/W</span>位<span
lang=EN-US>1)</span>、</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; # </span><span
style='font-family:宋体'>普通用户还是超级用户使用<span lang=EN-US>(U/S</span>位<span
lang=EN-US>2)</span>、是否修改过<span lang=EN-US>(</span>是否脏了<span lang=EN-US>)(D</span>位<span
lang=EN-US>6)</span>等；表项的位<span lang=EN-US>12-31</span>是</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; # </span><span
style='font-family:宋体'>页框地址，用于指出一页内存的物理起始地址。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>114</span></u><span lang=EN-US
style='font-family:宋体'> .org 0x1000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # </span><span
style='font-family:宋体'>从偏移<span lang=EN-US>0x1000</span>处开始是第<span lang=EN-US>1</span>个页表（偏移<span
lang=EN-US>0</span>开始处将存放页表目录）。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>115</span></u><span lang=EN-US
style='font-family:宋体'> pg0:</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>116</span></u><span lang=EN-US
style='font-family:宋体'> </span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>117</span></u><span lang=EN-US
style='font-family:宋体'> .org 0x2000</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>118</span></u><span lang=EN-US
style='font-family:宋体'> pg1:</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>119</span></u><span lang=EN-US
style='font-family:宋体'> </span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>120</span></u><span lang=EN-US
style='font-family:宋体'> .org 0x3000</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>121</span></u><span lang=EN-US
style='font-family:宋体'> pg2:</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>122</span></u><span lang=EN-US
style='font-family:宋体'> </span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>123</span></u><span lang=EN-US
style='font-family:宋体'> .org 0x4000</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>124</span></u><span lang=EN-US
style='font-family:宋体'> pg3:</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>125</span></u><span lang=EN-US
style='font-family:宋体'> </span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>126</span></u><span lang=EN-US
style='font-family:宋体'> .org 0x5000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #
</span><span style='font-family:宋体'>定义下面的内存数据块从偏移<span lang=EN-US>0x5000</span>处开始。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>127</span></u><span lang=EN-US
style='font-family:宋体'> /*</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>128</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * tmp_floppy_area is used by the floppy-driver
when DMA cannot</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>129</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * reach to a buffer-block. It needs to be
aligned, so that it isn't</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>130</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * on a 64kB border.</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>131</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; /* </span><span style='font-family:
宋体'>当<span lang=EN-US>DMA</span>（直接存储器访问）不能访问缓冲块时，下面的<span lang=EN-US>tmp_floppy_area</span>内存块</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>就可供软盘驱动程序使用。其地址需要对齐调整，这样就不会跨越<span lang=EN-US>64KB</span>边界。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; */</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>132</span></u><span lang=EN-US
style='font-family:宋体'> _tmp_floppy_area:</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>133</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .fill
1024,1,0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;#
</span><span style='font-family:宋体'>共保留<span lang=EN-US>1024</span>项，每项<span
lang=EN-US>1</span>字节，填充数值<span lang=EN-US>0</span>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>134</span></u><span lang=EN-US
style='font-family:宋体'> </span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>下面这几个入栈操作用于为跳转到<span lang=EN-US>init/main.c</span>中的<span lang=EN-US>main()</span>函数作准备工作。第<span
lang=EN-US>139</span>行上</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>的指令在栈中压入了返回地址，而第<span lang=EN-US>140</span>行则压入了<span lang=EN-US>main()</span>函数代码的地址。当<span
lang=EN-US>head.s</span></span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>最后在第<span lang=EN-US>218</span>行执行<span lang=EN-US>ret</span>指令时就会弹出<span
lang=EN-US>main()</span>的地址，并把控制权转移到<span lang=EN-US>init/main.c</span></span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>程序中。参见第<span lang=EN-US>3</span>章中有关<span lang=EN-US>C</span>函数调用机制的说明。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>前面<span lang=EN-US>3</span>个入栈<span lang=EN-US>0</span>值应该分别表示<span
lang=EN-US>envp</span>、<span lang=EN-US>argv</span>指针和<span lang=EN-US>argc</span>的值，但<span
lang=EN-US>main()</span>没有用到。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # 139</span><span style='font-family:
宋体'>行的入栈操作是模拟调用<span lang=EN-US>main.c</span>程序时首先将返回地址入栈的操作，所以如果</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # main.c</span><span
style='font-family:宋体'>程序真的退出时，就会返回到这里的标号<span lang=EN-US>L6</span>处继续执行下去，也即死循环。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # 140</span><span style='font-family:
宋体'>行将<span lang=EN-US>main.c</span>的地址压入堆栈，这样，在设置分页处理（<span lang=EN-US>setup_paging</span>）结束后</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>执行<span lang=EN-US>'ret'</span>返回指令时就会将<span lang=EN-US>main.c</span>程序的地址弹出堆栈，并去执行<span
lang=EN-US>main.c</span>程序了。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>有关<span lang=EN-US>C</span>函数调用机制请参见程序后的说明。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>135</span></u><span lang=EN-US
style='font-family:宋体'> after_page_tables:</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>136</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl
$0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# These are the parameters to main :-)</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>137</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl
$0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;# </span><span style='font-family:宋体'>这些是调用<span lang=EN-US>main</span>程序的参数（指<span
lang=EN-US>init/main.c</span>）。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>138</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl
$0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# </span><span style='font-family:宋体'>其中的<span lang=EN-US>'$'</span>符号表示这是一个立即操作数。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>139</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl
$L6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# return address for main, if it decides to.</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>140</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pushl
$_main&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# '_main'</span><span style='font-family:宋体'>是编译程序对<span lang=EN-US>main</span>的内部表示方法。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>141</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jmp
setup_paging&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;# </span><span
style='font-family:宋体'>跳转至第<span lang=EN-US>198</span>行。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span
 lang=EN-US style='font-family:宋体;color:blue'>142</span></u><span lang=EN-US
 style='font-family:宋体'> L</span><span lang=EN-US style='font-family:宋体'>6:</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>143</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jmp
L6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# main should never return here, but</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>144</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# just in case, we know what happens.</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# main</span><span style='font-family:宋体'>程序绝对不应该返回到这里。不过为了以防万一，</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# </span><span style='font-family:宋体'>所以添加了该语句。这样我们就知道发生什么问题了。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>145</span></u><span lang=EN-US
style='font-family:宋体'> </span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>146</span></u><span lang=EN-US
style='font-family:宋体'> /* This is the default interrupt &quot;handler&quot;
:-) */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; /* </span><span style='font-family:
宋体'>下面是默认的中断“向量句柄”</span><span lang=EN-US style='font-family:Wingdings'>J</span><span
lang=EN-US style='font-family:宋体'> */</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>147</span></u><span lang=EN-US
style='font-family:宋体'> int_msg:</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>148</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;.asciz
&quot;Unknown interrupt\n\r&quot;&nbsp;&nbsp;&nbsp;&nbsp; # </span><span
style='font-family:宋体'>定义字符串“未知中断<span lang=EN-US>(</span>回车换行<span lang=EN-US>)</span>”。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>149</span></u><span lang=EN-US
style='font-family:宋体'> .align 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;# </span><span style='font-family:宋体'>按<span lang=EN-US>4</span>字节方式对齐内存地址。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>150</span></u><span lang=EN-US
style='font-family:宋体'> ignore_int:</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>151</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl
%eax</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>152</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl
%ecx</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>153</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl
%edx</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>154</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; push
%ds&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;# </span><span
style='font-family:宋体'>这里请注意！！<span lang=EN-US>ds,es,fs,gs</span>等虽然是<span
lang=EN-US>16</span>位的寄存器，但入栈后</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>155</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; push
%es&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;# </span><span
style='font-family:宋体'>仍然会以<span lang=EN-US>32</span>位的形式入栈，也即需要占用<span
lang=EN-US>4</span>个字节的堆栈空间。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>156</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; push
%fs</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>157</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; movl
$0x10,%eax&nbsp;&nbsp; &nbsp;# </span><span style='font-family:宋体'>置段选择符（使<span
lang=EN-US>ds,es,fs</span>指向<span lang=EN-US>gdt</span>表中的数据段）。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>158</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mov
%ax,%ds</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>159</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mov
%ax,%es</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>160</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mov
%ax,%fs</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>161</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl $int_msg&nbsp;&nbsp;&nbsp;&nbsp;
# </span><span style='font-family:宋体'>把调用<span lang=EN-US>printk</span>函数的参数指针（地址）入栈。注意！若<span
lang=EN-US>int_msg</span></span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>162</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call
_printk&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>前不加<span lang=EN-US>'$'</span>，则表示把<span lang=EN-US>int_msg</span>符号处的长字（<span
lang=EN-US>'Unkn'</span>）入栈</span><span lang=EN-US style='font-family:Wingdings'>J</span><span
style='font-family:宋体'>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>163</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; popl
%eax&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# </span><span
style='font-family:宋体'>该函数在<span lang=EN-US>/kernel/printk.c</span>中。<span
lang=EN-US>'_printk'</span>是<span lang=EN-US>printk</span>编译后模块中</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>164</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pop
%fs&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# </span><span
style='font-family:宋体'>的内部表示法。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>165</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pop %es</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>166</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pop %ds</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>167</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; popl
%edx</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>168</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; popl
%ecx</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>169</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; popl
%eax</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>170</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iret&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;# </span><span style='font-family:宋体'>中断返回（把中断调用时压入栈的<span lang=EN-US>CPU</span>标志寄存器（<span
lang=EN-US>32</span>位）值也弹出）。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>171</span></u><span lang=EN-US
style='font-family:宋体'> </span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>172</span></u><span lang=EN-US
style='font-family:宋体'> </span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>173</span></u><span lang=EN-US
style='font-family:宋体'> /*</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>174</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * Setup_paging</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>175</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; *</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>176</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * This routine sets up paging by setting the page
bit</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>177</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * in cr0. The page tables are set up,
identity-mapping</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>178</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * the first 16MB. The pager assumes that no
illegal</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>179</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * addresses are produced (ie &gt;4Mb on a 4Mb
machine).</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>180</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; *</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>181</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * NOTE! Although all physical memory should be
identity</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>182</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * mapped by this routine, only the kernel page
functions</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>183</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * use the &gt;1Mb addresses directly. All
&quot;normal&quot; functions</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>184</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * use just the lower 1Mb, or the local data
space, which</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>185</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * will be mapped to some other place - mm keeps
track of</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>186</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * that.</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>187</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; *</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>188</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * For those with more memory than 16 Mb - tough
luck. I've</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>189</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * not got it, why should you :-) The source is
here. Change</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>190</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * it. (Seriously - it shouldn't be too difficult.
Mostly</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>191</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * change some constants etc. I left it at 16Mb,
as my machine </span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>192</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * even cannot be extended past that (ok, but it
was cheap :-)</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>193</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * I've tried to show which constants to change by
having</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>194</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * some kind of marker at them (search for
&quot;16Mb&quot;), but I</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>195</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; * won't guarantee that's all :-( )</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>196</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp; */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; /*</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>这个子程序通过设置控制寄存器<span lang=EN-US>cr0</span>的标志（<span
lang=EN-US>PG </span>位<span lang=EN-US>31</span>）来启动对内存的分页处理功能，</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>并设置各个页表项的内容，以恒等映射前<span lang=EN-US>16 MB</span>的物理内存。分页器假定不会产生非法的</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>地址映射（也即在只有<span lang=EN-US>4Mb</span>的机器上设置出大于<span
lang=EN-US>4Mb</span>的内存地址）。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; *</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>注意！尽管所有的物理地址都应该由这个子程序进行恒等映射，但只有内核页面管理函数能</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>直接使用<span lang=EN-US>&gt;1Mb</span>的地址。所有“普通”函数仅使用低于<span
lang=EN-US>1Mb</span>的地址空间，或者是使用局部数据</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>空间，该地址空间将被映射到其他一些地方去<span lang=EN-US> -- mm</span>（内存管理程序）会管理这些事的。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; *</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>对于那些有多于<span lang=EN-US>16Mb</span>内存的家伙 <span
lang=EN-US>– </span>真是太幸运了，我还没有，为什么你会有</span><span lang=EN-US style='font-family:
Wingdings'>J</span><span style='font-family:宋体'>。代码就在</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>这里，对它进行修改吧。（实际上，这并不太困难的。通常只需修改一些常数等。我把它设置</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>为<span lang=EN-US>16Mb</span>，因为我的机器再怎么扩充甚至不能超过这个界限（当然，我的机器是很便宜的</span><span
lang=EN-US style='font-family:Wingdings'>J</span><span style='font-family:宋体'>）。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>我已经通过设置某类标志来给出需要改动的地方（搜索“<span lang=EN-US>16Mb”</span>），但我不能保证作这些</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; * </span><span
style='font-family:宋体'>改动就行了</span><span lang=EN-US style='font-family:Wingdings'>L</span><span
style='font-family:宋体'>）。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp; */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>上面英文注释第<span lang=EN-US>2</span>段的含义是指在机器物理内存中大于<span lang=EN-US>1MB</span>的内存空间主要被用于主内存区。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>主内存区空间由<span lang=EN-US>mm</span>模块管理。它涉及到页面映射操作。内核中所有其他函数就是这里指的一般</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; #</span><span style='font-family:
宋体'>（普通）函数。若要使用主内存区的页面，就需要使用<span lang=EN-US>get_free_page()</span>等函数获取。因为主内</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>存区中内存页面是共享资源，必须有程序进行统一管理以避免资源争用和竞争。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>在内存物理地址<span lang=EN-US>0x0</span>处开始存放<span lang=EN-US>1</span>页页目录表和<span
lang=EN-US>4</span>页页表。页目录表是系统所有进程公用的，而</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>这里的<span lang=EN-US>4</span>页页表则属于内核专用，它们一一映射线性地址起始<span lang=EN-US>16MB</span>空间范围到物理内存上。对于</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>新的进程，系统会在主内存区为其申请页面存放页表。另外，<span lang=EN-US>1</span>页内存长度是<span lang=EN-US>4096</span>字节。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>197</span></u><span lang=EN-US
style='font-family:宋体'> .align 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#
</span><span style='font-family:宋体'>按<span lang=EN-US>4</span>字节方式对齐内存地址边界。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>198</span></u><span lang=EN-US
style='font-family:宋体'> setup_paging:&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#
</span><span style='font-family:宋体'>首先对<span lang=EN-US>5</span>页内存（<span
lang=EN-US>1</span>页目录<span lang=EN-US> + 4</span>页页表）清零。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>199</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; movl
$1024*5,%ecx&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 5 pages -
pg_dir+4 page tables */</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>200</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xorl
%eax,%eax</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>201</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xorl
%edi,%edi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/* pg_dir is at 0x000 */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# </span><span style='font-family:宋体'>页目录从<span lang=EN-US>0x000</span>地址开始。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>202</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
cld;rep;stosl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#
eax</span><span style='font-family:宋体'>内容存到<span lang=EN-US>es:edi</span>所指内存位置处，且<span
lang=EN-US>edi</span>增<span lang=EN-US>4</span>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>下面<span lang=EN-US>4</span>句设置页目录表中的项，因为我们（内核）共有<span lang=EN-US>4</span>个页表所以只需设置<span
lang=EN-US>4</span>项。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>页目录项的结构与页表中项的结构一样，<span lang=EN-US>4</span>个字节为<span lang=EN-US>1</span>项。参见上面<span
lang=EN-US>113</span>行下的说明。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>例如<span lang=EN-US>&quot;$pg0+7&quot;</span>表示：<span lang=EN-US>0x00001007</span>，是页目录表中的第<span
lang=EN-US>1</span>项。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>则第<span lang=EN-US>1</span>个页表所在的地址 <span lang=EN-US>= 0x00001007 &amp;
0xfffff000 = 0x1000</span>；</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>第<span lang=EN-US>1</span>个页表的属性标志<span lang=EN-US> = 0x00001007 &amp; 0x00000fff
= 0x07</span>，表示该页存在、用户可读写。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>203</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; movl
$pg0+7,_pg_dir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* set present
bit/user r/w */</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>204</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; movl
$pg1+7,_pg_dir+4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*&nbsp; --------- &quot; &quot;
--------- */</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>205</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; movl
$pg2+7,_pg_dir+8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*&nbsp; --------- &quot; &quot;
--------- */</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>206</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; movl
$pg3+7,_pg_dir+12&nbsp;&nbsp;&nbsp;&nbsp; /*&nbsp; --------- &quot; &quot;
--------- */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>下面<span lang=EN-US>6</span>行填写<span lang=EN-US>4</span>个页表中所有项的内容，共有：<span
lang=EN-US>4(</span>页表<span lang=EN-US>)*1024(</span>项<span lang=EN-US>/</span>页表<span
lang=EN-US>)=4096</span>项<span lang=EN-US>(0 - 0xfff)</span>，</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>也即能映射物理内存<span lang=EN-US> 4096*4Kb = 16Mb</span>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>每项的内容是：当前项所映射的物理内存地址<span lang=EN-US> + </span>该页的标志（这里均为<span lang=EN-US>7</span>）。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>使用的方法是从最后一个页表的最后一项开始按倒退顺序填写。一个页表的最后一项在页表中的</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>位置是<span lang=EN-US>1023*4 = 4092</span>。因此最后一页的最后一项的位置就是<span lang=EN-US>$pg3+4092</span>。
</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>207</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; movl
$pg3+4092,%edi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # edi</span><span
lang=EN-US style='font-family:Wingdings'>è</span><span style='font-family:宋体'>最后一页的最后一项。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>208</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; movl
$0xfff007,%eax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*&nbsp; 16Mb - 4096 +
7 (r/w user,p) */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# </span><span style='font-family:宋体'>最后<span lang=EN-US>1</span>项对应物理内存页面的地址是<span
lang=EN-US>0xfff000</span>，</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# </span><span style='font-family:宋体'>加上属性标志<span lang=EN-US>7</span>，即为<span
lang=EN-US>0xfff007</span>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>209</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# </span><span style='font-family:宋体'>方向位置位，<span lang=EN-US>edi</span>值递减<span
lang=EN-US>(4</span>字节<span lang=EN-US>)</span>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>210</span></u><span lang=EN-US
style='font-family:宋体'> 1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
stosl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/* fill pages backwards - more efficient :-) */</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>211</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; subl
$0x1000,%eax&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# </span><span
style='font-family:宋体'>每填写好一项，物理地址值减<span lang=EN-US>0x1000</span>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>212</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jge 1b&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# </span><span style='font-family:
宋体'>如果小于<span lang=EN-US>0</span>则说明全添写好了。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>设置页目录表基址寄存器<span lang=EN-US>cr3</span>的值，指向页目录表。<span lang=EN-US>cr3</span>中保存的是页目录表的物理地址。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>213</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xorl
%eax,%eax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/* pg_dir is at 0x0000 */&nbsp;&nbsp; # </span><span style='font-family:宋体'>页目录表在<span
lang=EN-US>0x0000</span>处。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>214</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; movl
%eax,%cr3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/* cr3 - page directory start */</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>设置启动使用分页处理（<span lang=EN-US>cr0</span>的<span lang=EN-US>PG</span>标志，位<span
lang=EN-US>31</span>）</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>215</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; movl
%cr0,%eax</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>216</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orl
$0x80000000,%eax&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;# </span><span
style='font-family:宋体'>添上<span lang=EN-US>PG</span>标志。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>217</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; movl
%eax,%cr0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/* set paging (PG) bit */</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>218</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ret&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/* this also flushes prefetch-queue */ </span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>在改变分页处理标志后要求使用转移指令刷新预取指令队列，这里用的是返回指令<span lang=EN-US>ret</span>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>该返回指令的另一个作用是将<span lang=EN-US>140</span>行压入堆栈中的<span lang=EN-US>main</span>程序的地址弹出，并跳转到<span
lang=EN-US>/init/main.c</span></span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>程序去运行。本程序到此就真正结束了。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>219</span></u><span lang=EN-US
style='font-family:宋体'> </span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>220</span></u><span lang=EN-US
style='font-family:宋体'> .align 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;# </span><span style='font-family:宋体'>按<span lang=EN-US>4</span>字节方式对齐内存地址边界。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>221</span></u><span lang=EN-US
style='font-family:宋体'> .word
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# </span><span style='font-family:宋体'>这里先空出<span lang=EN-US>2</span>字节，这样<span
lang=EN-US>224</span>行上的长字是<span lang=EN-US>4</span>字节对齐的。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; ! </span><span style='font-family:
宋体'>下面是加载中断描述符表寄存器<span lang=EN-US>idtr</span>的指令<span lang=EN-US>lidt</span>要求的<span
lang=EN-US>6</span>字节操作数。前<span lang=EN-US>2</span>字节是<span lang=EN-US>idt</span>表的限长，</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; ! </span><span style='font-family:
宋体'>后<span lang=EN-US>4</span>字节是<span lang=EN-US>idt</span>表在线性地址空间中的<span
lang=EN-US>32</span>位基地址。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>222</span></u><span lang=EN-US
style='font-family:宋体'> idt_descr:</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>223</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .word
256*8-1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# idt contains 256 entries &nbsp;# </span><span style='font-family:宋体'>共<span
lang=EN-US>256</span>项，限长<span lang=EN-US>=</span>长度<span lang=EN-US> - 1</span>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>224</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .long
_idt</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>225</span></u><span lang=EN-US
style='font-family:宋体'> .align 2</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>226</span></u><span lang=EN-US
style='font-family:宋体'> .word 0</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; ! </span><span style='font-family:
宋体'>下面加载全局描述符表寄存器<span lang=EN-US>gdtr</span>的指令<span lang=EN-US>lgdt</span>要求的<span
lang=EN-US>6</span>字节操作数。前<span lang=EN-US>2</span>字节是<span lang=EN-US>gdt</span>表的限长，</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; ! </span><span style='font-family:
宋体'>后<span lang=EN-US>4</span>字节是<span lang=EN-US>gdt</span>表的线性基地址。这里全局表长度设置为<span
lang=EN-US>2KB</span>字节（<span lang=EN-US>0x7ff</span>即可），因为每<span lang=EN-US>8</span>字节</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; ! </span><span style='font-family:
宋体'>组成一个描述符项，所以表中共可有<span lang=EN-US>256</span>项。符号<span lang=EN-US>_gdt</span>是全局表在本程序中的偏移位置，见<span
lang=EN-US>234</span>行。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>227</span></u><span lang=EN-US
style='font-family:宋体'> gdt_descr:</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>228</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .word
256*8-1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# so does gdt (not that that's any&nbsp;&nbsp; # </span><span style='font-family:
宋体'>注：<span lang=EN-US>not </span></span><span lang=EN-US style='font-family:
Wingdings'>à</span><span lang=EN-US style='font-family:宋体'> note</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>229</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .long
_gdt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# magic number, but it works for me :^)</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>230</span></u><span lang=EN-US
style='font-family:宋体'> </span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>231</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .align
3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;# </span><span style='font-family:宋体'>按<span lang=EN-US>8</span>（<span
lang=EN-US>2^3</span>）字节方式对齐内存地址边界。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>232</span></u><span lang=EN-US
style='font-family:宋体'> _idt:&nbsp;&nbsp; .fill
256,8,0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# idt is uninitialized&nbsp;&nbsp; # 256</span><span style='font-family:宋体'>项，每项<span
lang=EN-US>8</span>字节，填<span lang=EN-US>0</span>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>233</span></u><span lang=EN-US
style='font-family:宋体'> </span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>全局表。前<span lang=EN-US>4</span>项分别是空项（不用）、代码段描述符、数据段描述符、系统调用段描述符，其中</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>系统调用段描述符并没有派用处，<span lang=EN-US>Linus</span>当时可能曾想把系统调用代码专门放在这个独立的段中。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>后面还预留了<span lang=EN-US>252</span>项的空间，用于放置所创建任务的局部描述符<span lang=EN-US>(LDT)</span>和对应的任务状态段<span
lang=EN-US>TSS</span></span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # </span><span style='font-family:
宋体'>的描述符。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp; # (0-nul, 1-cs, 2-ds, 3-syscall,
4-TSS0, 5-LDT0, 6-TSS1, 7-LDT1, 8-TSS2 etc...)</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:宋体'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>234</span></u><span lang=EN-US
style='font-family:宋体'> _gdt:&nbsp;&nbsp; .quad
0x0000000000000000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* NULL descriptor
*/</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>235</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .quad
0x00c09a0000000fff&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 16Mb */&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;# 0x08</span><span style='font-family:宋体'>，内核代码段最大长度<span lang=EN-US>16MB</span>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>236</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .quad
0x00c0920000000fff&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 16Mb */&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;# 0x10</span><span style='font-family:宋体'>，内核数据段最大长度<span
lang=EN-US>16MB</span>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>237</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .quad
0x0000000000000000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* TEMPORARY -
don't use */</span></p>

<p class=MsoNormal align=left style='text-align:left'><u><span lang=EN-US
style='font-family:宋体;color:blue'>238</span></u><span lang=EN-US
style='font-family:宋体'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .fill
252,8,0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/* space for LDT's and TSS's etc */&nbsp; # </span><span style='font-family:
宋体'>预留空间。</span></p>

<div class=MsoNormal align=center style='text-align:center'><span lang=EN-US
style='font-family:宋体'>

<hr size=4 width="100%" align=center>

</span></div>

<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>

</div>

</body>

</html>
